#ifndef _CLIP_H
#define _CLIP_H
#include "BOOLEAN.H"

#define INSIDE 0
#define LEFT 1
#define TOP 2
#define RIGHT 4
#define BOTTOM 8

#ifndef _BYTE_
#define _BYTE_
typedef unsigned char byte;
#endif

typedef struct{
	int left;
	int right;
	int top;
	int bottom;
}Region;

typedef struct{
	int x0;
	int y0;
	int x1;
	int y1;
}Line;

boolean clipLine(Line old, Line* clipped, Region clipPlane, Region viewPort);
boolean clipLineToScreen(Line old, Line* clipped, Region clipPlane);
#endif
